package com.lwx.setAndMap;


public class BSTSet<T extends Comparable<T>> implements Set<T> {
    private BST<T> bst;
    public BSTSet(){
        bst = new BST<>();
    }
    @Override
    public void add(T e) {
        //bst本身的方法对于重复的元素不理会
        bst.add(e);
    }

    @Override
    public void remove(T e) {
        bst.remove(e);
    }

    @Override
    public boolean contains(T e) {
        return bst.contains(e);
    }

    @Override
    public int getSize() {
        return bst.getSize();
    }

    @Override
    public boolean isEmpty() {
        return bst.isEmpty();
    }
}
